package com.ggjj.filter_interceptor_controlleradvice_aop.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;


@Slf4j
@RestController
@RequestMapping("")
public class DemoController {
    @GetMapping("/demo/test/{id}")
    public Map<String,String> test(@PathVariable("id") Integer id){
        log.info("业务:user:id:{}",id);
        Map<String,String> map = new HashMap<>(2);
        map.put("code","200");
        int i=1;
//        i=1/0;
        return map;
    }
}
